<#if module_package_name?? && module_package_name != "">
package ${package_name}.action.${module_package_name};
<#else>
package ${package_name}.action;
</#if>

import org.apache.struts2.convention.annotation.ParentPackage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import ${common_package}.action.BaseAction;
import ${package_name}.entity.${tableInfo.changeTableName};
<#if module_package_name?? && module_package_name != "">
import ${package_name}.service.${module_package_name}.${tableInfo.changeTableName}Service;
<#else>
import ${package_name}.service.${tableInfo.changeTableName}Service;
</#if>


/**
 * ${(tableInfo.tableComment)!''}Action 控制器
 * @ClassName:  ${changTableNameTemp}Action   
 * @Description:TODO   
 * @author: ${author} 
 * @date: ${date}  
 */
@Controller
<#if module_package_name?? && module_package_name != "">
@ParentPackage("${module_package_name}")
</#if>
public class ${changTableNameTemp}Action extends BaseAction {
	/** serialVersionUID*/
	private static final long serialVersionUID = -${nowDateLong}L;
	
	private String id;
	private String formdata;// 页面提交表单数据
	
	// ${(tableInfo.tableComment)!''}实体类 
	private ${tableInfo.changeTableName} ${changTableNameTemp?uncap_first};
	
	
	@Autowired
	private ${tableInfo.changeTableName}Service ${changTableNameTemp?uncap_first}Service;
	
	/**
	 * 跳转到展示页面  
 	 * @author: ${author} 
 	 * @date: ${date}  
	 */
	public String show(){
		${changTableNameTemp?uncap_first} = ${changTableNameTemp?uncap_first}Service.get(id);
		
		return "show";
	}
	
	/**
	 * 跳转到列表页面  
 	 * @author: ${author} 
 	 * @date: ${date}  
	 */
	public String toList(){
		
		return "list";
	}
	
	/**
	 * 获取列表页数据
 	 * @author: ${author} 
 	 * @date: ${date}  
	 */
	public String listJson(){
		${changTableNameTemp?uncap_first} = ${changTableNameTemp?uncap_first}Service.get(id);
		
		String json = "";
		return json;
	}
	
	/**
	 * 保存页面信息
     * @Title: saveOrUpdate
 	 * @author: ${author} 
 	 * @date: ${date}  
     */
    public String saveOrUpdate() {
    	// 将页面提交表单数据转换为实体类
    	//${changTableNameTemp?uncap_first} = JsonUtil.toObject(formdata, ${tableInfo.changeTableName}.class);
    	
    	String json = "";
		return json;
    }
    
    /**
     * print 打印
     * @Title: print
 	 * @author: ${author} 
 	 * @date: ${date}  
     */
    public String print() {
    	${changTableNameTemp?uncap_first} = ${changTableNameTemp?uncap_first}Service.get(id);
    	
    	return "print";
    }
    /**
     * 删除
     * @Title: delete
 	 * @author: ${author} 
 	 * @date: ${date}  
     */
    public String delete(){
    	
    	String json = "";
		return json;
    }
    
    
    //-------getter Setter--------------
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getFormdata() {
		return formdata;
	}

	public void setFormdata(String formdata) {
		this.formdata = formdata;
	}

	public LaweForm get${tableInfo.changeTableName}() {
		return ${changTableNameTemp?uncap_first};
	}

	public void set${tableInfo.changeTableName}(${tableInfo.changeTableName} ${changTableNameTemp?uncap_first}) {
		this.laweForm = ${changTableNameTemp?uncap_first};
	}
    
	
}
